*Article Name: Evaluating Methods for Examining the Relative Persuasiveness of Policy Arguments
*Journal: Political Science Research and Methods
*Evaluating Methods for Examining the Relative Persuasiveness of Policy Arguments

********************
******Figure 1******
********************

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

*Post Only (Generates values for left two bars in Figure 1)
reg experiment1outcome dc_taxesonly if dc_corruptiononly!=1
reg experiment1outcome dc_corruptiononly if dc_taxesonly!=1

*RMWS (Generates values for right two bars in Figure 1)
ttest experiment2outcomebaseline=experiment2outcometaxes
ttest experiment2outcomebaseline=experiment2outcomecorruption

********************
******Figure 2******
********************

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*Post Only (Generates values for left two bars in Figure 2)
reg betweensubjectsdv drug_saveonly if drug_limitonly!=1
reg betweensubjectsdv drug_limitonly if drug_saveonly!=1

*RMWS (Generates values for right two bars in Figure 2)

ttest within_initial=withinsubjectssaveoutcome
ttest within_initial=withinsubjectslimitoutcome



********************
******APPENDIX******
********************

**********
*Table A1*
**********

*Study 1
*Lines 46-52 produce values for the first column of Table A1
use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

tab Party 
tab ideo3
tab Race
tab male
tab educ3

*Study 2
*Lines 56-63 produce values for the first column of Table A1
use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

tab pidstem
tab ideo3
tab white
tab black
tab male
tab educ3

***********
*Table A2a*
***********

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

tab pidwoleaners dcstatehood_cond , col
tab ideo3 dcstatehood_cond, col
tab Race dcstatehood_cond, col
tab male dcstatehood_cond, col
tab educ3 dcstatehood_cond, col

***********
*Table A2b*
***********

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

tab pidwoleaners drug_cond, col
tab ideo3 drug_cond, col
tab white drug_cond, col
tab black drug_cond, col
tab male drug_cond, col
tab educ3 drug_cond, col

***********
*Figure A1*
***********

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

*Post Only (Produces values for the left three bars in Figure A1)
tabstat experiment1outcome if dc_control==1, statistics(n mean semean cv)
tabstat experiment1outcome if dc_taxesonly==1, statistics(n mean semean cv)
tabstat experiment1outcome if dc_corruptiononly==1, statistics(n mean semean cv)

*RMWS (Produces values for the right three bars in Figure A1)
tabstat experiment2outcomebaseline, statistics(n mean semean cv)
tabstat experiment2outcometaxes, statistics(n mean semean cv)
tabstat experiment2outcomecorruption, statistics(n mean semean cv)

***********
*Figure A2*
***********

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*Post Only (Produces values for the left three bars in Figure A2)
tabstat betweensubjectsdv if drug_control==1, statistics(n mean semean cv)
tabstat betweensubjectsdv if drug_saveonly==1, statistics(n mean semean cv)
tabstat betweensubjectsdv if drug_limitonly==1, statistics(n mean semean cv)

*RMWS (Produces values for the right three bars in Figure A2)
tabstat within_initial, statistics(n mean semean cv)
tabstat withinsubjectssaveoutcome, statistics(n mean semean cv)
tabstat withinsubjectslimitoutcome, statistics(n mean semean cv)

***********
*Table A3a*
***********

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

*Baseline-Taxes-Corruption Order
*Line 130 produces the value of the first row, first column of Table A3a
sum experiment2outcometaxes if dc_taxcorr==1
*Line 132 produces the value of the second row, second column of Table A3a
sum experiment2outcomecorruption if dc_taxcorr==1

*Baseline-Corruption-Taxes
*Line 136 produces the value of the first row, second column of Table A3a
sum experiment2outcometaxes if dc_corrtax==1
*Line 138 produces the value of the second row, first column of Table A3a
sum experiment2outcomecorruption if dc_corrtax==1

***********
*Table A3b*
***********

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*Baseline-Save-Limit
*Line 148 produces the value of the first row, first column of Table A3b
sum withinsubjectssaveoutcome if drug_savetolimit==1
*Line 150 produces the value of the second row, second column of Table A3b
sum withinsubjectslimitoutcome if drug_savetolimit==1

*Baseline-Limit-Save
*Line 154 produces the value of the first row, second column of Table A3b
sum withinsubjectssaveoutcome if drug_limittosave==1
*Line 156 produces the value of the second row, first column of Table A3b
sum withinsubjectslimitoutcome if drug_limittosave==1

********************
******TABLE A4a*****
********************

*Study 1: Statistical Significance (Repeated Measures)

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

*First for effect of taxes argument

*Repeated Measures Significance Test - Taxes Argument
*Lines 170-198 produce the values for the first column of Table A4a

*1. Drop those in Corruption Condition and then recode for four measurements (Exp. 1 Control DV, Exp. 1 Treat DV, Exp. 2 Baseline DV, Exp. 2 Treat DV)

drop if dc_corruptiononly==1
drop experiment2

gen dv1=experiment1outcome if dc_control==1
gen dv2=experiment2outcomebaseline
gen dv3=experiment1outcome if dc_taxesonly==1
gen dv4=experiment2outcometaxes

sum dv1 dv2 dv3 dv4

*2. Generate unique identifier

generate id=_n

*3. Reshaping to long form

reshape long dv, i(id) j(time)
gen taxestreat=0
replace taxestreat=1 if time==3 | time==4
gen experiment2=0
replace experiment2=1 if time==2 | time==4

*4. Using the xtreg repeated measures

xtset id
xtreg dv i.taxestreat##i.experiment2, vce(cluster id) re

*Repeated Measures Significance Test - Corruption Argument
*Lines 206-233 produce the values for the second column of Table A4a

clear all
use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

*1. Drop those in Corruption Condition and then recode for four measurements (Exp. 1 Control DV, Exp. 1 Treat DV, Exp. 2 Baseline DV, Exp. 2 Treat DV)

drop if dc_taxesonly==1
drop experiment2

gen dv1=experiment1outcome if dc_control==1
gen dv2=experiment2outcomebaseline
gen dv3=experiment1outcome if dc_corruptiononly==1
gen dv4=experiment2outcomecorruption

sum dv1 dv2 dv3 dv4

*2. Generate unique identifier

generate id=_n

*3. Reshaping to long form

reshape long dv, i(id) j(time)
gen corruptiontreat=0
replace corruptiontreat=1 if time==3 | time==4
gen experiment2=0
replace experiment2=1 if time==2 | time==4

*4. Using the xtreg repeated measures

xtset id
xtreg dv i.corruptiontreat##i.experiment2, vce(cluster id) re

clear all

********************
******TABLE A4b*****
********************

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*Study 2: Statistical Significance (Repeated Measures)

*First for effect of taxes argument

*NOTE: I do not save the stacked datasets for version control

*Repeated Measures Significance Test - Save Money
*Lines 252-278 produce the values for the first column of Table A4b

*1. Drop those in Limit Access conditions and then recode for four measurements (Exp. 1 Control DV, Exp. 1 Treat DV, Exp. 2 Baseline DV, Exp. 2 Treat DV)

drop if drug_limitonly==1

gen dv1=betweensubjectsdv if drug_control==1
gen dv2=within_initial
gen dv3=betweensubjectsdv if drug_saveonly==1
gen dv4=withinsubjectssaveoutcome

sum dv1 dv2 dv3 dv4

*2. Generate unique identifier

generate id=_n

*3. Reshaping to long form

reshape long dv, i(id) j(time)
gen savetreat=0
replace savetreat=1 if time==3 | time==4
gen experiment2=0
replace experiment2=1 if time==2 | time==4

*4. Using the xtreg repeated measures

xtset id
xtreg dv i.savetreat##i.experiment2, vce(cluster id) re

*Repeated Measures Significance Test - Limit Access
*Lines 288-314 produce the values for the second column of Table A4b

*Bring Data back in

clear all
use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*1. Drop those in Save Money conditions and then recode for four measurements (Exp. 1 Control DV, Exp. 1 Treat DV, Exp. 2 Baseline DV, Exp. 2 Treat DV)

drop if drug_saveonly==1

gen dv1=betweensubjectsdv if drug_control==1
gen dv2=within_initial
gen dv3=betweensubjectsdv if drug_limitonly==1
gen dv4=withinsubjectslimitoutcome

sum dv1 dv2 dv3 dv4

*2. Generate unique identifier

generate id=_n

*3. Reshaping to long form

reshape long dv, i(id) j(time)
gen limittreat=0
replace limittreat=1 if time==3 | time==4
gen experiment2=0
replace experiment2=1 if time==2 | time==4

*4. Using the xtreg repeated measures

xtset id
xtreg dv i.limittreat##i.experiment2, vce(cluster id) re

clear all

************
**TABLE A5**
************

*Study 1 - Taxes
use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 1.dta"

*Post Only vs. Control
*Line 327 provides the values for the first row, first column of Table A5
reg experiment1outcome dc_taxesonly if dc_corruptiononly!=1

*RMWS First Q vs. Control
*Line 331 provides the values for the second row, first column of Table A5
reg rmwstaxesvscontrol dc_taxcorr

*Diff-in-Diff
*Line 335 provides a coefficient on the dc_taxcorr variable, which is the diff-in-diff
reg taxesdiff dc_taxcorr dc_control

*Study 1 - Corruption
*Line 340 provides the values for the first row, second column of Table A5
*Post Only vs. Control
reg experiment1outcome dc_corruptiononly if dc_taxesonly!=1

*RMWS First Q vs. Control
*Line 344 provides the values for the second row, second column of Table A5
reg rmwscorrvscontrol dc_corrtax

*Diff-in-Diff
*Line 348 provides a coefficient on the dc_corrtax variable, which is the diff-in-diff
reg corrdiff dc_corrtax dc_control


*Study 2 - Save Money
use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*Post Only vs. Control
*Line 356 provides the values for the first row, third column of Table A5
reg betweensubjectsdv drug_saveonly if drug_limitonly!=1

*RMWS First Q vs. Control
*Line 360 provides the values for the second row, third column of Table A5
reg rmwssavevscontrol drug_savetolimit

*Diff-in-Diff
*Line 364 provides a coefficient on the drug_savetolimit variable, which is the diff-in-diff
reg savediff drug_savetolimit drug_control

*Study 2 - Limit Access

*Post Only vs. Control
*Line 370 provides the values for the first row, fourth column of Table A5
reg betweensubjectsdv drug_limitonly if drug_saveonly!=1

*RMWS First Q vs. Control
*Line 374 provides the values for the first row, third column of Table A5
reg rmwslimitvscontrol drug_limittosave

*Diff-in-Diff
*Line 378 provides a coefficient on the drug_limittosave variable, which is the diff-in-diff
reg limitdiff drug_limittosave drug_control


************
**TABLE A6**
************

use "C:\Users\Jared McDonald\Dropbox\Policy Rationale Project\Replication Files\Study 2.dta"

*Lines 388-389 produce values for the first column of Table A6
reg betweensubjectsdv drug_limitonly if drug_saveonly!=1
bysort foldedideo: reg betweensubjectsdv drug_limitonly if drug_saveonly!=1

*Lines 392-393 produce values for the second column of Table A6
ttest within_initial=withinsubjectslimitoutcome
bysort foldedideo: ttest within_initial=withinsubjectslimitoutcome


**********
*Table A7*
**********

ta withinsubjects finaloutcome, row missing
